package com.jlkf.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import com.jlkf.service.DriverAccessoryService;

@Controller
@RequestMapping("car")
public class DriverAccessoryController {

	@Autowired
	private DriverAccessoryService driverAccessoryService;
	
	@RequestMapping("getCarList")
	public Object getCarList(String startTime,Integer serverType,String endTime,String models,String licensePlate,
			String vehicleRand,Integer pageNo,Integer pageSize,String order){
		return driverAccessoryService.getCarList( startTime,  serverType,endTime, licensePlate, models,vehicleRand,pageNo,pageSize,order);
	}
	//添加
	@RequestMapping("addOrUpdate")
	public Object addOrUpdate(@RequestBody String json,HttpServletRequest request){
		return driverAccessoryService.addOrUpdate(json,request);
	}
	//删除车辆
	@RequestMapping("deleteCar")
	public Object deleteCar(Long carId){
		return driverAccessoryService.deleteCar(carId);
	}
	
}
